<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>渲染函数选型对象</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>

<body>
    <div id="app">

    </div>


    <script>
       var root = {
        data(){
            return {
                msg:"你好"
            }
        },
        template:`
        <p>
            {{msg}}
        </p>
        `
       };
        var app = new Vue({
            el: "#app",
            // 通过渲染函数
            render:function(h){
                return h(root)
            }
        })

    </script>
</body>

</html>